<script>
	$(function() {
		$( "#tabs" ).tabs();
	});
	</script>



<div class="demo">

<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Details</a></li>
		<li><a href="#tabs-2">Features</a></li>
	</ul>
	<div id="tabs-1">

            <?php
foreach ($product_arr as $product_entry) :
	$filePath= DOCROOT."images/products/". $product_entry['filename'];
        $imagePath= SITEURL."images/products/". $product_entry['filename'];
?>
<form name="frmProductDetails" method="POST" action="<?php echo SITEURL; ?>index.php/?addtocart">
    <h2><?php echo $product_entry['product_title']; ?></h2>
	<div class="product_desc">
		<div class="product">
			<div class="mblock clearfix inner">
				<div class="lblock pimage">
				<?php
					if(file_exists($filePath))
					{
				?>
					<img src="<?php echo $imagePath; ?>" alt="<?php echo $product_entry['product_title']; ?>" border="0" />
				<?php
					} else {
				?>
					<img src="<?php echo SITEURL; ?>images/products/NoImage.jpg" border="0" alt="<?php echo $item_entry['product_title']; ?>" width="100" height="100" />
				<?php
					}
				?>
				</div>
				<div class="rblock prices">
					Only :
					<div class="formatedPrice">
						<?php 
							if(!empty($product_entry['discount']))
							{
						?>
							<s>LKR <?php echo number_format($product_entry['product_price_lkr'], 2, '.', ','); ?></s> LKR <?php echo number_format($product_entry['discount'], 2, '.', ','); ?>
						<?php 	
							} else {
							echo "LKR " . number_format($product_entry['product_price_lkr'], 2, '.', ','); 
							}
						?>
					</div>
				</div>
				<div class="cblock desc">
					<div class="specifications">
				    	<?php echo $product_entry['product_dsc_en']; ?>
				    </div>
					<div class="SellingUnit"> 1 Each </div>
					<div class="webid">Item Number : <?php echo $product_entry['item_code']; ?></div>
				</div>
				<div class="rblock actions">
					<div class="quadd">
						<label>Quantity :</label>
						<input type="text" name="txtQty" id="txtQty" value="1" maxlength="5" size="2" onkeyup="validateQty('<?php echo $product_entry['productid']; ?>')" class="quantity qinp" />
						
                                                <input type="submit" class="add" value="Add to Basket" name="btnAddCart">
						<input type="hidden" name="productid" id="productid" value="<?php echo $product_entry['productid']; ?>" />
    					<input type="hidden" name="price" id="price" value="<?php echo (!empty($product_entry['discount'])?$product_entry['discount']:$product_entry['product_price_lkr']); ?>" />
					</div>
				</div>
			</div>
		</div>

	</div>
</form>
<?php
endforeach;
?>
		
	</div>
	<div id="tabs-2">
            <ul>
            <?php if($feature_arr):?>

            <?php foreach($feature_arr as $arr):?>
                <li><?php echo $arr["structkey"] ;?> : <?php echo $arr["structvalue"]?> </li>
            <?php endforeach;?>
            <?php endif;?>
        </ul>
	</div>
	  <div><?php echo $product_entry['product_dsc_detail'];?></div>
</div>
  
</div><!-- End demo -->



<div class="demo-description" style="display: none; ">
<p>Click tabs to swap between content that is broken into logical sections.</p>
</div><!-- End demo-description -->